using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.ConnectionEngine.Registers.Core.ServiceProvider.Common
{
    
    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class Pool
    {
        private int poolID = int.MinValue;
        public int PoolID
        {
            get { return poolID; }
            set { poolID = value; }
        }

        private string poolName = string.Empty;
        public string PoolName
        {
            get { return poolName; }
            set { poolName = value; }
        }
        
        private System.Collections.Generic.List<ServiceProvider> serviceProviders = new List<ServiceProvider>();
        public System.Collections.Generic.List<ServiceProvider> ServiceProviders
        {
            get
            {
                if (serviceProviders == null) serviceProviders = new List<ServiceProvider>();
                return serviceProviders;
            }
            set { serviceProviders = value; }
        }

        public Pool()
        {
        }

        public Pool(int poolID, string poolName)
        {
            this.poolID = poolID;
            this.poolName = poolName;
        }
    }


    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class Pools
    {
        private List<Pool> poolList;

        [System.Xml.Serialization.XmlElementAttribute("Pool")]
        public List<Pool> PoolList
        {
            get {return poolList;}
            set {poolList = value;}
        }

        public Pools()
        {
            poolList = new List<Pool>();
        }

        public Pools(List<Pool> newPoolList)
        {
            poolList = newPoolList;
        }
    }

    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class PoolServiceProviderType
    {
        private Pool pool = new Pool();
        public Pool Pool
        {
            get { return pool; }
            set { pool = value; }
        }

        private ServiceProviderType serviceProviderType = new ServiceProviderType();
        public ServiceProviderType ServiceProviderType
        {
            get { return serviceProviderType; }
            set { serviceProviderType = value; }
        }

        public PoolServiceProviderType() { }

        public PoolServiceProviderType(Pool pool, ServiceProviderType serviceProviderType)
        {
            this.pool = pool;
            this.serviceProviderType = serviceProviderType;
        }

    }

    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class PoolServiceProviderTypes
    {
        private List<PoolServiceProviderType> poolServiceProviderTypeList;

        [System.Xml.Serialization.XmlElementAttribute("PoolServiceProviderType")]
        public List<PoolServiceProviderType> Items
        {
            get { return poolServiceProviderTypeList; }
            set { poolServiceProviderTypeList = value; }
        }

        public PoolServiceProviderTypes()
        {
            poolServiceProviderTypeList = new List<PoolServiceProviderType>();
        }

        public PoolServiceProviderTypes(List<PoolServiceProviderType> newpoolServiceProviderTypeList)
        {
            poolServiceProviderTypeList = newpoolServiceProviderTypeList;
        }
    }

    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class PoolSearchRequest
    {

        private string displayName = string.Empty;

        public string DisplayName
        {
            get { return displayName; }
            set { displayName = value; }
        }
        private string serviceProviderTypeID = string.Empty;

        public string ServiceProviderTypeID
        {
            get { return serviceProviderTypeID; }
            set { serviceProviderTypeID = value; }
        }
        private string serviceProviderID = string.Empty;

        public string ServiceProviderID
        {
            get { return serviceProviderID; }
            set { serviceProviderID = value; }
        }
        private bool inServiceProvider = true;

        public bool InServiceProvider
        {
            get { return inServiceProvider; }
            set { inServiceProvider = value; }
        } 

        public PoolSearchRequest()
        {
            displayName = "";
        }

 
    }

    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class PoolServiceProviderTypeLink
    {
        private int poolID = int.MinValue;
        public int PoolID
        {
            get { return poolID; }
            set { poolID = value; }
        }

        private int serviceProviderTypeID = int.MinValue;
        public int ServiceProviderTypeID
        {
            get { return serviceProviderTypeID; }
            set { serviceProviderTypeID = value; }
        }

        public PoolServiceProviderTypeLink() { }

        public PoolServiceProviderTypeLink(int poolID, int serviceProviderTypeID)
        {
            this.poolID = poolID;
            this.serviceProviderTypeID = serviceProviderTypeID;      
        }

    }


    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class PoolServiceProviderTypeLinks
    {
        private List<PoolServiceProviderTypeLink> poolServiceProviderTypeLinkList;

        [System.Xml.Serialization.XmlElementAttribute("PoolServiceProviderTypeLink")]
        public List<PoolServiceProviderTypeLink> Items
        {
            get { return poolServiceProviderTypeLinkList; }
            set { poolServiceProviderTypeLinkList = value; }
        }

        public PoolServiceProviderTypeLinks()
        {
            poolServiceProviderTypeLinkList = new List<PoolServiceProviderTypeLink>();
        }

        public PoolServiceProviderTypeLinks(List<PoolServiceProviderTypeLink> newpoolServiceProviderTypeLinkList)
        {
            poolServiceProviderTypeLinkList = newpoolServiceProviderTypeLinkList;
        }
    }
}
